// Reset the global service locator, so any services that have already been created will be
// re-created while taking into account any custom settings and extensions.
MediaWikiServices::resetGlobalInstance( new GlobalVarConfig(), 'quick' );
+// Apply $wgSharedDB table aliases for the local LB (all non-foreign DB connections)
+if ( $wgSharedDB && $wgSharedTables ) {
+ MediaWikiServices::getInstance()->getDBLoadBalancer()->setTableAliases(
+ array_fill_keys(
+ $wgSharedTables,
+ [
+ 'dbname' => $wgSharedDB,
+ 'schema' => $wgSharedSchema,
+ 'prefix' => $wgSharedPrefix
+ ]
+ )
+ );
+}
// Define a constant that indicates that the bootstrapping of the service locator
// is complete.
if ( is_null( $wgLocalTZoffset ) ) {
$wgLocalTZoffset = date( 'Z' ) / 60;
}
+// The part after the System| is ignored, but rest of MW fills it
+// out as the local offset.
+$wgDefaultUserOptions['timecorrection'] = "System|$wgLocalTZoffset";
if ( !$wgDBerrorLogTZ ) {
$wgDBerrorLogTZ = $wgLocaltimezone;
wfDebugLog( 'caches',
'cluster: ' . get_class( $wgMemc ) .
- ', WAN: ' . $wgMainWANCache .
+ ', WAN: ' . ( $wgMainWANCache === CACHE_NONE ? 'CACHE_NONE' : $wgMainWANCache ) .
', stash: ' . $wgMainStash .
', message: ' . get_class( $messageMemc ) .
', parser: ' . get_class( $parserMemc ) .